from sklearn.feature_extraction import DictVectorizer

def dict_Dome():

    tras=DictVectorizer(sparse=False)
    data=[{'city':'北京','temperature':100},{'city':'上海','temperature':75},{'city':'深圳','temperature':50}]
    deal=tras.fit_transform(data)
    print(deal)
    print(tras.get_feature_names())
    return None


dict_Dome()